import { http } from '@/utils/http.js'
/**
 * 医生科室列表
 */
export const departmentListApi = () => {
  return http.request({
    url: '/dep/all'
  })
}

// 预支付，问诊-支付页面-计算就诊信息和抵扣信息
export const patientConsultOrderPreApi = (data) => {
  return http.request({
    method: 'GET',
    url: '/patient/consult/order/pre',
    params: data
  })
}

// 问诊-保存/修改问诊订单
export const patientConsultOrderApi = (data) => {
  return http.request({
    method: 'POST',
    url: '/patient/consult/order',
    data
  })
}

//问诊-查询订单详情信息-找医生、极速问诊和开药问诊
export const patientConsultOrderDetailAPI = (orderId) => {
  return http.request({
    url: '/patient/consult/order/detail',
    params: { orderId }
  })
}

/*
问诊记录-订单列表-找医生、极速问诊、开药问诊
*/
export const patientConsultOrderListAPI = (data, loading = true) => {
  return http.request({
    method: 'GET',
    url: '/patient/consult/order/list',
    params: data,
    custom: {
      loading
    }
  })
}
